import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/Top/HomeView.vue'
import login from '../views//login/login.vue'
import UserView from'../views/meun/UserView.vue'
import ScoreView from'../views/meun/ScoreView.vue'
import MainView from '../views/meun/MainView.vue'
import Information from "@/views/shouye/Information.vue";
import SchoolNotice from "@/views/meun/SchoolNotice.vue";
import HomeWorkView from "@/views/meun/HomeWorkView.vue";
import StudentView from "@/views/meun/StudentView.vue";
import AttendenceView from "@/views/meun/AttendenceView.vue";
import MessageView from "@/views/meun/MessageView.vue";
import CommentView from "@/views/meun/CommentView.vue";
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
	  {
			path: '/login',
			name: 'login',
			component: login
		},
	  {
		  	path: '/',
		  	name: 'information',
		  	component: Information
	  },
		{
			path: '/home',
			name: 'home',
			component: HomeView,
			mate: {
				name: "主页面"
			},
			redirect: "/main",
			children: [
				{
				path: '/main',
				name: 'main',
				component: MainView,
				mate: {
					name: "首页"
				}
			},{
				path: '/user',
				name: 'user',
				component: UserView,
				mate: {
					name: "用户管理"
				}
			},{
				path: '/score',
				name: 'score',
				component: ScoreView,
				mate: {
					name: "成绩管理"
				}
			},{
				path:'/info',
				name: 'SchoolNotice',
				component: SchoolNotice,
				mate: {
					name:"学校通知"
				}
			},{
				path:'/homework',
				name: 'HomeWorkView',
				component: HomeWorkView,
				mate: {
					name:"作业管理"
				}
			},{
				path:'/student',
				name: 'StudentView',
				component: StudentView,
				mate: {
					name:"学生页面"
				}
			},{
				path:'/attendance',
				name: 'AttendenceView',
				component: AttendenceView,
				mate: {
					name:"考勤管理"
				}
			},{
				path:'/messages',
				name: 'MessageView',
				component: MessageView,
				mate: {
					name:"留言管理"
				}
			},{
				path:'/comments',
				name: 'CommentView',
				component: CommentView,
				mate: {
					name:"孩子信息"
				}
			},
			]
		}
  ]
})

export default router
